#include <iostream>
#include <iomanip>

using namespace std;

int main_004()
{
    long long n = 0;
    long long m = 0;
    long long a = 0;
    cin >> n >> m >> a;
    cout << (n / a) * (m / a);
    return 0;
}
